﻿using GroupMeal.Foods;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace GroupMeal.Menus
{
    /// <summary>
    /// 日菜单详情
    /// </summary>
    public class DailyMenuDetail :Entity<Guid>,IMultiTenant
    {
        /// <summary>
        /// 租户ID
        /// </summary>
        public virtual Guid? TenantId
        {
            get; set;
        }

        /// <summary>
        /// 商家菜品ID
        /// </summary>
        public virtual Guid MerchantFoodId
        {
            get; set;
        }


        /// <summary>
        /// 商家菜品
        /// </summary>
        [Required]
        public virtual MerchantFood MerchantFood
        {
            get; set;
        }

        /// <summary>
        /// 菜品类型id
        /// </summary>
        public virtual Guid FoodTypeId
        {
            get; set;
        }

        /// <summary>
        /// 商家菜品类型
        /// </summary>
        [Required]
        public virtual MerchantFoodType FoodType
        {
            get; set;
        }

        /// <summary>
        /// 上架
        /// </summary>
        public virtual bool IsActive
        {
            get; set;
        }

        /// <summary>
        /// 库存
        /// </summary>
        public virtual int Stock
        {
            get; set;
        } = 0;

        /// <summary>
        /// 已订数量
        /// </summary>
        public virtual int OrderedCount
        {
            get;
            set;
        }

        public virtual Guid? ScheduleDetailId
        {
            get;set;
        }

        /// <summary>
        /// 计划
        /// </summary>
        public virtual ScheduleDetail? ScheduleDetail
        {
            get;set;
        }

        /// <summary>
        /// 餐别   枚举： 早餐、午餐、晚餐
        /// </summary>
        public virtual MealType MealType
        {
            get;set;
        }

        /// <summary>
        /// 作为早餐时的日菜单Id
        /// </summary>
        public virtual Guid? BreakfastDailyMenuId
        {
            get;set;
        }

        /// <summary>
        /// 作为早餐时的日菜单
        /// </summary>
        public virtual DailyMenu? BreakfastDailyMenu
        {
            get;set;
        }

        /// <summary>
        /// 作为午餐时的日菜单Id
        /// </summary>
        public virtual Guid? LaunchDailyMenuId
        {
            get;set;
        }

        /// <summary>
        /// 作为午餐时的日菜单
        /// </summary>
        public virtual DailyMenu? LaunchDailyMenu
        {
            get;set;
        }

        /// <summary>
        /// 作为晚餐时的日菜单Id
        /// </summary>
        public virtual Guid? DinnerDailyMenuId
        {
            get;set;
        }

        /// <summary>
        /// 作为晚餐时的日菜单
        /// </summary>
        public virtual DailyMenu? DinnerDailyMenu
        {
            get;set;
        }
    }
}
